from rest_framework.serializers import ModelSerializer

from workflow.models import *


class TemplatesSer(ModelSerializer):
    class Meta:
        model = Templates
        fields = '__all__'


class FlowSer(ModelSerializer):
    class Meta:
        model = Flow
        depth = 1
        fields = '__all__'


class TempInstanceSer(ModelSerializer):
    flow = FlowSer(many=True)

    class Meta:
        model = TempInstance
        fields = '__all__'
